3.1.26 \(\int \frac {d+e x}{(4-5 x^2+x^4)^2} \, dx\)

Optimal. Leaf size=94 \[ \frac {d x \left (17-5 x^2\right )}{72 \left (x^4-5 x^2+4\right )}+\frac {19}{432} d \tanh ^{-1}\left (\frac {x}{2}\right )-\frac {1}{54} d \tanh ^{-1}(x)+\frac {1}{27} e \log \left (1-x^2\right )-\frac {1}{27} e \log \left (4-x^2\right )+\frac {e \left (5-2 x^2\right )}{18 \left (x^4-5 x^2+4\right )} \]

________________________________________________________________________________________

Rubi [A]  time = 0.05, antiderivative size = 94, normalized size of antiderivative = 1.00, number of steps used = 12, number of rules used = 9, integrand size = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.500, Rules used = {1673, 12, 1092, 1166, 207, 1107, 614, 616, 31} \begin {gather*} \frac {d x \left (17-5 x^2\right )}{72 \left (x^4-5 x^2+4\right )}+\frac {19}{432} d \tanh ^{-1}\left (\frac {x}{2}\right )-\frac {1}{54} d \tanh ^{-1}(x)+\frac {e \left (5-2 x^2\right )}{18 \left (x^4-5 x^2+4\right )}+\frac {1}{27} e \log \left (1-x^2\right )-\frac {1}{27} e \log \left (4-x^2\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(d + e*x)/(4 - 5*x^2 + x^4)^2,x]

[Out]

(d*x*(17 - 5*x^2))/(72*(4 - 5*x^2 + x^4)) + (e*(5 - 2*x^2))/(18*(4 - 5*x^2 + x^4)) + (19*d*ArcTanh[x/2])/432 -
 (d*ArcTanh[x])/54 + (e*Log[1 - x^2])/27 - (e*Log[4 - x^2])/27

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rule 207

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> -Simp[ArcTanh[(Rt[b, 2]*x)/Rt[-a, 2]]/(Rt[-a, 2]*Rt[b, 2]), x] /;
 FreeQ[{a, b}, x] && NegQ[a/b] && (LtQ[a, 0] || GtQ[b, 0])

Rule 614

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Simp[((b + 2*c*x)*(a + b*x + c*x^2)^(p + 1))/((p +
1)*(b^2 - 4*a*c)), x] - Dist[(2*c*(2*p + 3))/((p + 1)*(b^2 - 4*a*c)), Int[(a + b*x + c*x^2)^(p + 1), x], x] /;
 FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0] && LtQ[p, -1] && NeQ[p, -3/2] && IntegerQ[4*p]

Rule 616

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> With[{q = Rt[b^2 - 4*a*c, 2]}, Dist[c/q, Int[1/Simp
[b/2 - q/2 + c*x, x], x], x] - Dist[c/q, Int[1/Simp[b/2 + q/2 + c*x, x], x], x]] /; FreeQ[{a, b, c}, x] && NeQ
[b^2 - 4*a*c, 0] && PosQ[b^2 - 4*a*c] && PerfectSquareQ[b^2 - 4*a*c]

Rule 1092

Int[((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^(p_), x_Symbol] :> -Simp[(x*(b^2 - 2*a*c + b*c*x^2)*(a + b*x^2 + c*x^
4)^(p + 1))/(2*a*(p + 1)*(b^2 - 4*a*c)), x] + Dist[1/(2*a*(p + 1)*(b^2 - 4*a*c)), Int[(b^2 - 2*a*c + 2*(p + 1)
*(b^2 - 4*a*c) + b*c*(4*p + 7)*x^2)*(a + b*x^2 + c*x^4)^(p + 1), x], x] /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*
a*c, 0] && LtQ[p, -1] && IntegerQ[2*p]

Rule 1107

Int[(x_)*((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^(p_.), x_Symbol] :> Dist[1/2, Subst[Int[(a + b*x + c*x^2)^p, x],
 x, x^2], x] /; FreeQ[{a, b, c, p}, x]

Rule 1166

Int[((d_) + (e_.)*(x_)^2)/((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4), x_Symbol] :> With[{q = Rt[b^2 - 4*a*c, 2]}, Di
st[e/2 + (2*c*d - b*e)/(2*q), Int[1/(b/2 - q/2 + c*x^2), x], x] + Dist[e/2 - (2*c*d - b*e)/(2*q), Int[1/(b/2 +
 q/2 + c*x^2), x], x]] /; FreeQ[{a, b, c, d, e}, x] && NeQ[b^2 - 4*a*c, 0] && NeQ[c*d^2 - a*e^2, 0] && PosQ[b^
2 - 4*a*c]

Rule 1673

Int[(Pq_)*((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^(p_), x_Symbol] :> Module[{q = Expon[Pq, x], k}, Int[Sum[Coeff[
Pq, x, 2*k]*x^(2*k), {k, 0, q/2}]*(a + b*x^2 + c*x^4)^p, x] + Int[x*Sum[Coeff[Pq, x, 2*k + 1]*x^(2*k), {k, 0,
(q - 1)/2}]*(a + b*x^2 + c*x^4)^p, x]] /; FreeQ[{a, b, c, p}, x] && PolyQ[Pq, x] &&  !PolyQ[Pq, x^2]

Rubi steps

\begin {align*} \int \frac {d+e x}{\left (4-5 x^2+x^4\right )^2} \, dx &=\int \frac {d}{\left (4-5 x^2+x^4\right )^2} \, dx+\int \frac {e x}{\left (4-5 x^2+x^4\right )^2} \, dx\\ &=d \int \frac {1}{\left (4-5 x^2+x^4\right )^2} \, dx+e \int \frac {x}{\left (4-5 x^2+x^4\right )^2} \, dx\\ &=\frac {d x \left (17-5 x^2\right )}{72 \left (4-5 x^2+x^4\right )}-\frac {1}{72} d \int \frac {-1+5 x^2}{4-5 x^2+x^4} \, dx+\frac {1}{2} e \operatorname {Subst}\left (\int \frac {1}{\left (4-5 x+x^2\right )^2} \, dx,x,x^2\right )\\ &=\frac {d x \left (17-5 x^2\right )}{72 \left (4-5 x^2+x^4\right )}+\frac {e \left (5-2 x^2\right )}{18 \left (4-5 x^2+x^4\right )}+\frac {1}{54} d \int \frac {1}{-1+x^2} \, dx-\frac {1}{216} (19 d) \int \frac {1}{-4+x^2} \, dx-\frac {1}{9} e \operatorname {Subst}\left (\int \frac {1}{4-5 x+x^2} \, dx,x,x^2\right )\\ &=\frac {d x \left (17-5 x^2\right )}{72 \left (4-5 x^2+x^4\right )}+\frac {e \left (5-2 x^2\right )}{18 \left (4-5 x^2+x^4\right )}+\frac {19}{432} d \tanh ^{-1}\left (\frac {x}{2}\right )-\frac {1}{54} d \tanh ^{-1}(x)-\frac {1}{27} e \operatorname {Subst}\left (\int \frac {1}{-4+x} \, dx,x,x^2\right )+\frac {1}{27} e \operatorname {Subst}\left (\int \frac {1}{-1+x} \, dx,x,x^2\right )\\ &=\frac {d x \left (17-5 x^2\right )}{72 \left (4-5 x^2+x^4\right )}+\frac {e \left (5-2 x^2\right )}{18 \left (4-5 x^2+x^4\right )}+\frac {19}{432} d \tanh ^{-1}\left (\frac {x}{2}\right )-\frac {1}{54} d \tanh ^{-1}(x)+\frac {1}{27} e \log \left (1-x^2\right )-\frac {1}{27} e \log \left (4-x^2\right )\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.05, size = 90, normalized size = 0.96 \begin {gather*} \frac {1}{864} \left (\frac {12 \left (d x \left (17-5 x^2\right )+e \left (20-8 x^2\right )\right )}{x^4-5 x^2+4}+8 (d+4 e) \log (1-x)-(19 d+32 e) \log (2-x)-8 (d-4 e) \log (x+1)+(19 d-32 e) \log (x+2)\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(d + e*x)/(4 - 5*x^2 + x^4)^2,x]

[Out]

((12*(e*(20 - 8*x^2) + d*x*(17 - 5*x^2)))/(4 - 5*x^2 + x^4) + 8*(d + 4*e)*Log[1 - x] - (19*d + 32*e)*Log[2 - x
] - 8*(d - 4*e)*Log[1 + x] + (19*d - 32*e)*Log[2 + x])/864

________________________________________________________________________________________

IntegrateAlgebraic [F]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {d+e x}{\left (4-5 x^2+x^4\right )^2} \, dx \end {gather*}

Verification is not applicable to the result.

[In]

IntegrateAlgebraic[(d + e*x)/(4 - 5*x^2 + x^4)^2,x]

[Out]

IntegrateAlgebraic[(d + e*x)/(4 - 5*x^2 + x^4)^2, x]

________________________________________________________________________________________

fricas [B]  time = 1.47, size = 169, normalized size = 1.80 \begin {gather*} -\frac {60 \, d x^{3} + 96 \, e x^{2} - 204 \, d x - {\left ({\left (19 \, d - 32 \, e\right )} x^{4} - 5 \, {\left (19 \, d - 32 \, e\right )} x^{2} + 76 \, d - 128 \, e\right )} \log \left (x + 2\right ) + 8 \, {\left ({\left (d - 4 \, e\right )} x^{4} - 5 \, {\left (d - 4 \, e\right )} x^{2} + 4 \, d - 16 \, e\right )} \log \left (x + 1\right ) - 8 \, {\left ({\left (d + 4 \, e\right )} x^{4} - 5 \, {\left (d + 4 \, e\right )} x^{2} + 4 \, d + 16 \, e\right )} \log \left (x - 1\right ) + {\left ({\left (19 \, d + 32 \, e\right )} x^{4} - 5 \, {\left (19 \, d + 32 \, e\right )} x^{2} + 76 \, d + 128 \, e\right )} \log \left (x - 2\right ) - 240 \, e}{864 \, {\left (x^{4} - 5 \, x^{2} + 4\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)/(x^4-5*x^2+4)^2,x, algorithm="fricas")

[Out]

-1/864*(60*d*x^3 + 96*e*x^2 - 204*d*x - ((19*d - 32*e)*x^4 - 5*(19*d - 32*e)*x^2 + 76*d - 128*e)*log(x + 2) +
8*((d - 4*e)*x^4 - 5*(d - 4*e)*x^2 + 4*d - 16*e)*log(x + 1) - 8*((d + 4*e)*x^4 - 5*(d + 4*e)*x^2 + 4*d + 16*e)
*log(x - 1) + ((19*d + 32*e)*x^4 - 5*(19*d + 32*e)*x^2 + 76*d + 128*e)*log(x - 2) - 240*e)/(x^4 - 5*x^2 + 4)

________________________________________________________________________________________

giac [A]  time = 0.23, size = 93, normalized size = 0.99 \begin {gather*} \frac {1}{864} \, {\left (19 \, d - 32 \, e\right )} \log \left ({\left | x + 2 \right |}\right ) - \frac {1}{108} \, {\left (d - 4 \, e\right )} \log \left ({\left | x + 1 \right |}\right ) + \frac {1}{108} \, {\left (d + 4 \, e\right )} \log \left ({\left | x - 1 \right |}\right ) - \frac {1}{864} \, {\left (19 \, d + 32 \, e\right )} \log \left ({\left | x - 2 \right |}\right ) - \frac {5 \, d x^{3} + 8 \, x^{2} e - 17 \, d x - 20 \, e}{72 \, {\left (x^{4} - 5 \, x^{2} + 4\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)/(x^4-5*x^2+4)^2,x, algorithm="giac")

[Out]

1/864*(19*d - 32*e)*log(abs(x + 2)) - 1/108*(d - 4*e)*log(abs(x + 1)) + 1/108*(d + 4*e)*log(abs(x - 1)) - 1/86
4*(19*d + 32*e)*log(abs(x - 2)) - 1/72*(5*d*x^3 + 8*x^2*e - 17*d*x - 20*e)/(x^4 - 5*x^2 + 4)

________________________________________________________________________________________

maple [A]  time = 0.02, size = 122, normalized size = 1.30 \begin {gather*} \frac {19 d \ln \left (x +2\right )}{864}-\frac {19 d \ln \left (x -2\right )}{864}+\frac {d \ln \left (x -1\right )}{108}-\frac {d \ln \left (x +1\right )}{108}-\frac {e \ln \left (x +2\right )}{27}-\frac {e \ln \left (x -2\right )}{27}+\frac {e \ln \left (x -1\right )}{27}+\frac {e \ln \left (x +1\right )}{27}-\frac {d}{144 \left (x -2\right )}-\frac {d}{36 \left (x +1\right )}-\frac {d}{36 \left (x -1\right )}-\frac {d}{144 \left (x +2\right )}-\frac {e}{72 \left (x -2\right )}+\frac {e}{36 x +36}-\frac {e}{36 \left (x -1\right )}+\frac {e}{72 x +144} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((e*x+d)/(x^4-5*x^2+4)^2,x)

[Out]

-19/864*d*ln(x-2)-1/27*e*ln(x-2)-1/144/(x-2)*d-1/72/(x-2)*e-1/108*d*ln(x+1)+1/27*e*ln(x+1)-1/36/(x+1)*d+1/36/(
x+1)*e-1/36/(x-1)*d-1/36/(x-1)*e+1/108*d*ln(x-1)+1/27*e*ln(x-1)-1/144/(x+2)*d+1/72/(x+2)*e+19/864*d*ln(x+2)-1/
27*e*ln(x+2)

________________________________________________________________________________________

maxima [A]  time = 1.68, size = 83, normalized size = 0.88 \begin {gather*} \frac {1}{864} \, {\left (19 \, d - 32 \, e\right )} \log \left (x + 2\right ) - \frac {1}{108} \, {\left (d - 4 \, e\right )} \log \left (x + 1\right ) + \frac {1}{108} \, {\left (d + 4 \, e\right )} \log \left (x - 1\right ) - \frac {1}{864} \, {\left (19 \, d + 32 \, e\right )} \log \left (x - 2\right ) - \frac {5 \, d x^{3} + 8 \, e x^{2} - 17 \, d x - 20 \, e}{72 \, {\left (x^{4} - 5 \, x^{2} + 4\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)/(x^4-5*x^2+4)^2,x, algorithm="maxima")

[Out]

1/864*(19*d - 32*e)*log(x + 2) - 1/108*(d - 4*e)*log(x + 1) + 1/108*(d + 4*e)*log(x - 1) - 1/864*(19*d + 32*e)
*log(x - 2) - 1/72*(5*d*x^3 + 8*e*x^2 - 17*d*x - 20*e)/(x^4 - 5*x^2 + 4)

________________________________________________________________________________________

mupad [B]  time = 0.09, size = 84, normalized size = 0.89 \begin {gather*} \ln \left (x-1\right )\,\left (\frac {d}{108}+\frac {e}{27}\right )-\ln \left (x+1\right )\,\left (\frac {d}{108}-\frac {e}{27}\right )-\ln \left (x-2\right )\,\left (\frac {19\,d}{864}+\frac {e}{27}\right )+\ln \left (x+2\right )\,\left (\frac {19\,d}{864}-\frac {e}{27}\right )+\frac {-\frac {5\,d\,x^3}{72}-\frac {e\,x^2}{9}+\frac {17\,d\,x}{72}+\frac {5\,e}{18}}{x^4-5\,x^2+4} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((d + e*x)/(x^4 - 5*x^2 + 4)^2,x)

[Out]

log(x - 1)*(d/108 + e/27) - log(x + 1)*(d/108 - e/27) - log(x - 2)*((19*d)/864 + e/27) + log(x + 2)*((19*d)/86
4 - e/27) + ((5*e)/18 + (17*d*x)/72 - (5*d*x^3)/72 - (e*x^2)/9)/(x^4 - 5*x^2 + 4)

________________________________________________________________________________________

sympy [B]  time = 3.57, size = 604, normalized size = 6.43 \begin {gather*} - \frac {\left (d - 4 e\right ) \log {\left (x + \frac {- 6006260 d^{4} e + 2341251 d^{4} \left (d - 4 e\right ) - 18247680 d^{2} e^{3} + 24099840 d^{2} e^{2} \left (d - 4 e\right ) + 7387904 d^{2} e \left (d - 4 e\right )^{2} - 665280 d^{2} \left (d - 4 e\right )^{3} + 587202560 e^{5} - 12582912 e^{4} \left (d - 4 e\right ) - 36700160 e^{3} \left (d - 4 e\right )^{2} + 786432 e^{2} \left (d - 4 e\right )^{3}}{1675971 d^{5} - 66150400 d^{3} e^{2} + 318767104 d e^{4}} \right )}}{108} + \frac {\left (d + 4 e\right ) \log {\left (x + \frac {- 6006260 d^{4} e - 2341251 d^{4} \left (d + 4 e\right ) - 18247680 d^{2} e^{3} - 24099840 d^{2} e^{2} \left (d + 4 e\right ) + 7387904 d^{2} e \left (d + 4 e\right )^{2} + 665280 d^{2} \left (d + 4 e\right )^{3} + 587202560 e^{5} + 12582912 e^{4} \left (d + 4 e\right ) - 36700160 e^{3} \left (d + 4 e\right )^{2} - 786432 e^{2} \left (d + 4 e\right )^{3}}{1675971 d^{5} - 66150400 d^{3} e^{2} + 318767104 d e^{4}} \right )}}{108} + \frac {\left (19 d - 32 e\right ) \log {\left (x + \frac {- 6006260 d^{4} e - \frac {2341251 d^{4} \left (19 d - 32 e\right )}{8} - 18247680 d^{2} e^{3} - 3012480 d^{2} e^{2} \left (19 d - 32 e\right ) + 115436 d^{2} e \left (19 d - 32 e\right )^{2} + \frac {10395 d^{2} \left (19 d - 32 e\right )^{3}}{8} + 587202560 e^{5} + 1572864 e^{4} \left (19 d - 32 e\right ) - 573440 e^{3} \left (19 d - 32 e\right )^{2} - 1536 e^{2} \left (19 d - 32 e\right )^{3}}{1675971 d^{5} - 66150400 d^{3} e^{2} + 318767104 d e^{4}} \right )}}{864} - \frac {\left (19 d + 32 e\right ) \log {\left (x + \frac {- 6006260 d^{4} e + \frac {2341251 d^{4} \left (19 d + 32 e\right )}{8} - 18247680 d^{2} e^{3} + 3012480 d^{2} e^{2} \left (19 d + 32 e\right ) + 115436 d^{2} e \left (19 d + 32 e\right )^{2} - \frac {10395 d^{2} \left (19 d + 32 e\right )^{3}}{8} + 587202560 e^{5} - 1572864 e^{4} \left (19 d + 32 e\right ) - 573440 e^{3} \left (19 d + 32 e\right )^{2} + 1536 e^{2} \left (19 d + 32 e\right )^{3}}{1675971 d^{5} - 66150400 d^{3} e^{2} + 318767104 d e^{4}} \right )}}{864} + \frac {- 5 d x^{3} + 17 d x - 8 e x^{2} + 20 e}{72 x^{4} - 360 x^{2} + 288} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)/(x**4-5*x**2+4)**2,x)

[Out]

-(d - 4*e)*log(x + (-6006260*d**4*e + 2341251*d**4*(d - 4*e) - 18247680*d**2*e**3 + 24099840*d**2*e**2*(d - 4*
e) + 7387904*d**2*e*(d - 4*e)**2 - 665280*d**2*(d - 4*e)**3 + 587202560*e**5 - 12582912*e**4*(d - 4*e) - 36700
160*e**3*(d - 4*e)**2 + 786432*e**2*(d - 4*e)**3)/(1675971*d**5 - 66150400*d**3*e**2 + 318767104*d*e**4))/108
+ (d + 4*e)*log(x + (-6006260*d**4*e - 2341251*d**4*(d + 4*e) - 18247680*d**2*e**3 - 24099840*d**2*e**2*(d + 4
*e) + 7387904*d**2*e*(d + 4*e)**2 + 665280*d**2*(d + 4*e)**3 + 587202560*e**5 + 12582912*e**4*(d + 4*e) - 3670
0160*e**3*(d + 4*e)**2 - 786432*e**2*(d + 4*e)**3)/(1675971*d**5 - 66150400*d**3*e**2 + 318767104*d*e**4))/108
 + (19*d - 32*e)*log(x + (-6006260*d**4*e - 2341251*d**4*(19*d - 32*e)/8 - 18247680*d**2*e**3 - 3012480*d**2*e
**2*(19*d - 32*e) + 115436*d**2*e*(19*d - 32*e)**2 + 10395*d**2*(19*d - 32*e)**3/8 + 587202560*e**5 + 1572864*
e**4*(19*d - 32*e) - 573440*e**3*(19*d - 32*e)**2 - 1536*e**2*(19*d - 32*e)**3)/(1675971*d**5 - 66150400*d**3*
e**2 + 318767104*d*e**4))/864 - (19*d + 32*e)*log(x + (-6006260*d**4*e + 2341251*d**4*(19*d + 32*e)/8 - 182476
80*d**2*e**3 + 3012480*d**2*e**2*(19*d + 32*e) + 115436*d**2*e*(19*d + 32*e)**2 - 10395*d**2*(19*d + 32*e)**3/
8 + 587202560*e**5 - 1572864*e**4*(19*d + 32*e) - 573440*e**3*(19*d + 32*e)**2 + 1536*e**2*(19*d + 32*e)**3)/(
1675971*d**5 - 66150400*d**3*e**2 + 318767104*d*e**4))/864 + (-5*d*x**3 + 17*d*x - 8*e*x**2 + 20*e)/(72*x**4 -
 360*x**2 + 288)

________________________________________________________________________________________